import java.util.Scanner;

public class Demo1 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();

        int count = 0;
        boolean fly = true;
        String[] string = new String[1000];

        for(int i =0; i < str.length();i++) {
            String strNext = "";
            if(str.charAt(i) == '"') {
                fly = !fly;
                i++;
            }

            while(i < str.length() && str.charAt(i) !=' ' && fly) {
                strNext += str.charAt(i);
                i++;
            }
            if(fly) {
                string[count++] = strNext;
            }

            char ch = str.charAt(i);
            while(i < str.length() && str.charAt(i) !='"' &&str.charAt(i) !=' ' && !fly) {
                strNext += str.charAt(i);
                i++;
            }

            if(!fly && str.charAt(i) !=' ') {
                string[count++] = strNext;
            }
            fly = true;

        }

        System.out.println(count);
        for(int i= 0; i < count; i++) {
            System.out.println(string[i]);
        }
    }
}
